home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 December / MACPOWER-1997-12.ISO.7z / MACPOWER-1997-12.ISO / AMUG / PROGRAMMING / Raven 1.2 Examples.sit / Raven 1.2 Examples / Quill / Source / PaneEditor.h < prev    next >
Text File  |  1997-07-27  |  2KB  |  85 lines

  1. /*
  2.  *  File:       PaneEditor.h
  3.  *  Summary:       A view that knows how to edit a TPane.
  4.  *  Written by: Jesse Jones
  5.  *
  6.  *  Copyright ゥ 1996 Jesse Jones. 
  7.  *    For conditions of distribution and use, see copyright notice in ZTypes.h  
  8.  *
  9.  *  Change History (most recent first):    
  10.  *
  11.  *         <->    10/15/96    JDJ        Created
  12.  */
  13.  
  14. #pragma once
  15.  
  16. #include "BasePaneEditor.h"
  17.  
  18.  
  19. // ===================================================================================
  20. //    class CPaneInfo
  21. // ===================================================================================
  22. struct CPaneInfo :  public SPaneInfo {
  23.     string    className;
  24.     
  25.                         CPaneInfo();
  26.                         
  27.                         CPaneInfo(const SPaneInfo& paneInfo, const string& className);
  28. };
  29.  
  30.  
  31. // ===================================================================================
  32. //    CPaneEditor
  33. //        Can't use CBasePaneEditor because we're using CPaneInfo which is incompatible
  34. //        with mPane->GetInfo().
  35. // ===================================================================================
  36. class CPaneEditor : public CRootPaneEditor {
  37.  
  38.     typedef CRootPaneEditor Inherited;
  39.     
  40. //-----------------------------------
  41. //    Initialization/Destruction
  42. //
  43. public:
  44.     virtual                ~CPaneEditor();
  45.                         
  46.                         CPaneEditor(TView* superView);
  47.  
  48. //-----------------------------------
  49. //    CBaseEditor API
  50. //
  51. public:
  52.     virtual void         SetPane(TPane* pane);
  53.     
  54.     virtual void         Apply();
  55.     
  56.     virtual void         Commit(TMultipleUndoableCommand* command);
  57.  
  58.     virtual void         Revert();
  59.  
  60. //-----------------------------------
  61. //    TReanimator Support
  62. //
  63. public:
  64.     static     MReanimatable* Create(MReanimatable* parent);
  65.  
  66. //-----------------------------------
  67. //    Internal API
  68. //
  69. protected:
  70.             CPaneInfo     GetEditorInfo() const;
  71.             
  72.             void         SetEditorInfo(const CPaneInfo& info);
  73.             
  74.             void         SetPaneInfo(const CPaneInfo& info);
  75.             
  76. //-----------------------------------
  77. //    Member data
  78. //
  79. protected:
  80.     TPane*        mPane;
  81.     CPaneInfo    mOldInfo;
  82. };
  83.  
  84.  
  85.